<template>
  <div>
    <a-card :bordered="false" title="">
      <this-table @callback="callback" ref="table" />
    </a-card>
    <!-- <this-modal ref="modal" /> -->
  </div>
</template>

<script>
import thisTable from './table'
// import thisModal from './modal.vue'
export default {
  components: { thisTable },
  methods: {
    callback(row) {
      row.loading = true
      this.axios
        .post('/a/callback-buys/send', {
          id: row.id,
        })
        .then((res) => {
          if (res.data.code === 1) {
            this.$refs.table.$refs.table.onRefresh()
            this.$message.success('已发送')
            console.log(row.loading)
            row.loading = false
          } else {
            this.$message.error(res.data.msg)
            row.loading = false
          }
        })
    },
  },
}
</script>

